#ifndef BYTE_HANDLER_H_
#define BYTE_HANDLER_H_
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>

#define NETWORK_RECV_SUCCES "_network_recv_success"

 enum net_status{
	NET_SUCCES, 
	NET_FAILURE, 
	NET_WAITING,
	NET_READY2READ,
	NET_READY2WRITE
};

struct net_package
{
	// Maybe typedef?
	char *buffer;
	int size;
	char status;
};

// Enums used for return codes , when server has  recievved data successfully or failed
int SendMessage(int tar_socket, char *msg);
// Sends a message to given socket

int RecieveMessage(int tar_socket, char *tmpbuffer);
// Recieves a message from target socket, stores it in tmpbuffer

int SendReturnCode(int tar_socket, char *status);
// Send a return code to client

int SendPackage(int tar_socket, struct net_package *package);



#endif
